export {}
import { persistor, store } from "~store"
// chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
//     if (request.action === 'sendRequest') {
//         setInterval(_=> {
//             sendResponse(123456)
//         }, 1000)
//         console.log(XMLHttpRequest)
//       const xhr = new XMLHttpRequest();
//       xhr.open(request.method, request.url, true);
  
//       xhr.onload = function () {
//         const response = {
//           status: xhr.status,
//           responseText: xhr.responseText
//         };
//         console.log(response)
//         sendResponse({ success: true, response });
//       };
      
//       xhr.onerror = function () {
//         sendResponse({ success: false, error: 'Failed to send the request' });
//       };
  
//       xhr.send(request.body);
//       return true;
//     }
//   });

// let index =  0
// setInterval(() => {
//     chrome.cookies.getAll({
//         name: 'msToken',
//         domain: '.jinritemai.com'
//     }, (cookies) => {
//         console.log('cookies0', index++, cookies)
//     })
// }, 1000)

persistor.subscribe(() => {
  console.log("State changed with: ", store?.getState())
})
